window.onload = function(){
    getNowTime();
};

//设置当前时间
function getNowTime(){
    var date = new Date();
    var year = date.getFullYear();
    var month = date.getMonth()+1;
    var day = date.getDate();
    var week = date.getDay();
    var nowweek;
    if(week == 1){
        nowweek = "星期一";
    }else if(week == 2){
        nowweek = "星期二";
    }else if(week == 3){
        nowweek = "星期三";
    }else if(week == 4){
        nowweek = "星期四";
    }else if(week == 5){
        nowweek = "星期五";
    }else if(week == 6){
        nowweek = "星期六";
    }else if(week == 0){
        nowweek = "星期日";
    }
    var dInfo = year + '年' + month + '月' + day + '日' + ' '+ nowweek;
    $("#dateInfo").text(dInfo);
}

//登录
function login(){
    window.location.href='./lock-list.html';
}